Skip to content

Conversation

@jamshale
Copy link
Contributor

@jamshale jamshale commented Oct 14, 2025

This should be ready to go now. It basically does the things required to upgrade to python 3.13. A few key points.

  • There was a breaking change with askar storage returning a list type that the new python interpreter didn't like. Instead of trying to change this in askar we can just parse the list from askar into a python list.
  • There was some things needed with library installs in order to build the compatible wheels.
  • Some of the docker images (demo) used a public image from ghrc. This cause compatibility issues when upgrading python and installing dependencies. It's better to build the demo image from the source code.

The plugins all need to be upgraded with acapy core. The corresponding PR is here. openwallet-foundation/acapy-plugins#2504. It can have it's acapy ref updated and be merged after this.

The Interop tests are failing because the test harness project needs to have python upgraded. Will do this later.

@swcurran swcurran marked this pull request as draft October 14, 2025 21:17
@jamshale jamshale marked this pull request as ready for review October 14, 2025 22:39
@jamshale jamshale marked this pull request as draft October 14, 2025 22:50
@jamshale jamshale marked this pull request as ready for review October 16, 2025 18:36
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 16, 2025

@jamshale jamshale linked an issue Oct 27, 2025 that may be closed by this pull request
@jamshale jamshale force-pushed the python-3.13 branch 2 times, most recently from c0b8841 to 2cdab0b Compare December 16, 2025 20:52
@jamshale jamshale requested a review from Copilot December 16, 2025 20:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request upgrades the Python version from 3.12 to 3.13 across the entire ACA-Py (Aries Cloud Agent - Python) project. The upgrade touches configuration files, Docker images, CI/CD pipelines, documentation, and includes code changes to maintain compatibility with Python 3.13.

Key Changes:

  • Updated Python version specification from ^3.12 to ^3.13 in pyproject.toml
  • Upgraded propcache dependency from 0.4.0 to 0.4.1 and added it as an explicit dependency
  • Added list() conversions in anoncreds code for iterating over database query results
  • Removed conditional typing-extensions dependency markers for Python < 3.13
  • Replaced web.py PyPI package with Git installation in demo Dockerfile for Python 3.13 compatibility
  • Changed pysqlcipher3 to sqlcipher3-wheels in Docker build

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
sonar-project.properties Updates Sonar Python version configuration to 3.13
pyproject.toml Changes Python dependency to ^3.13 and adds explicit propcache dependency
poetry.lock Updates lock file with new dependency versions, removes Python < 3.13 conditional dependencies
docs/readthedocs.yaml Updates ReadTheDocs build to use Python 3.13
docs/features/devcontainer.md Updates documentation reference from Python 3.12 to 3.13
docker/Dockerfile.test Updates base image to python:3.13-slim-bookworm, removes python_version ARG
docker/Dockerfile.run Updates base image to python:3.13-slim-bookworm, removes python_version ARG
docker/Dockerfile.demo Rebuilds from python:3.13 base, adds Git installation of web.py, removes user chown
docker/Dockerfile Updates default python_version ARG to 3.13, replaces pysqlcipher3 with sqlcipher3-wheels
demo/requirements.txt Removes web.py~=0.62 (moved to Git installation in Dockerfile)
demo/playground/examples/Dockerfile.test.runner Updates to python:3.13-slim
acapy_agent/anoncreds/revocation/revocation.py Adds list() conversion for database query results in two locations
acapy_agent/anoncreds/issuer.py Adds list() conversion for database query results in two locations
README.md Updates Python version badge from 3.12 to 3.13
.readthedocs.yaml Updates ReadTheDocs Python version to 3.13
.github/workflows/*.yml Updates all GitHub Actions workflows to use Python 3.13
.devcontainer/* Updates devcontainer configuration to use Python 3.13
Comments suppressed due to low confidence (1)

docker/Dockerfile.demo:42

  • Installing web.py from the GitHub repository appears to be a workaround for Python 3.13 compatibility since the PyPI version was removed from demo/requirements.txt. Consider documenting why this specific installation method is needed, or better yet, wait for an official PyPI release that supports Python 3.13. Installing directly from Git repositories can lead to reproducibility issues and makes it harder to track which version is actually being used.
RUN pip3 install git+https://github.com/webpy/webpy.git

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

esune
esune previously approved these changes Dec 22, 2025
@ff137
Copy link
Member

ff137 commented Dec 22, 2025

Just a note: once this is merged, there is a Ruff lint category that can be selected: "UP". It helps to automatically upgrade python syntax to abide by a target version.

So we can later add to the pyproject.toml:

[tool.ruff]
target-version = "py313"
lint.select = [
    "UP",  # pyupgrade (upgrade syntax)
]

And then ruff check --fix will automatically upgrade from old to the newer syntax, for the given target-version (e.g. things like Dict -> dict, List -> list, Optional[str] -> str | None -- because a lot of the typing imports are now deprecated).

Just mentioning because it's a nice lil feature for that to be done automatically.

Signed-off-by: JamieHale <jamiehalebc@gmail.com>
Signed-off-by: JamieHale <jamiehalebc@gmail.com>
…ub repo

Signed-off-by: JamieHale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
@sonarqubecloud
Copy link

@jamshale
Copy link
Contributor Author

This is updated with main. I removed the non python 3.13 compatible webpy library from the demo container. I'm not sure what this was for previously, but it isn't referenced anywhere in the project. Oddly, it installed earlier?

@jamshale
Copy link
Contributor Author

@esune This and the plugin repo PR have been updated and need a new approval.

@jamshale jamshale merged commit d752721 into openwallet-foundation:main Dec 23, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to python version 3.13

3 participants